package cn.xiaopengstack.types.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

/**
 * @author jiangyangang
 */

@AllArgsConstructor
@NoArgsConstructor
@Getter
public enum ResponseCode {

    /**
     * 系统领域
     */
    SUCCESS("E0000", "成功"),
    UN_ERROR("E0001", "未知失败"),
    ILLEGAL_PARAMETER("E0002", "非法参数"),
    HTTP_EXCEPTION("E0004", "请求外部HTTP接口异常"),
    REQUEST_TOO_FREQUENT("E0005", "请求过于频繁，请稍后再试"),
    /**
     * 折扣领域
     */
    UNKNOWN_DISCOUNT("E0103", "未知的折扣类型"),
    /**
     * 活动领域
     */
    INVALID_ACTIVITY("E2001", "无效的拼团活动"),
    ACTIVITY_EXPIRED("E2002", "拼团活动已过期"),
    UNKNOW_ACTIVITY("E2003", "未知的拼团活动"),
    ACTIVITY_NO_START("E2004", "拼团活动尚未开始"),

    /**
     * 下单领域
     */
    LOCK_ORDER_FAIL("E3001", "拼团锁单失败"),
    TRADE_COUNT_LIMITED("E3002", "拼团活动次数超限"),
    TRADE_EMPTY_ORDER("E3003", "不存在的锁单订单"),
    TRADE_SETTLEMENT_ORDER_FAIL("E3004", "结算订单失败"),
    TRADE_OCCUPY_STOCK_FAIL("E3005", "库存抢占失败"),
    TRADE_REFUND_UNKNOW_TYPE("E3006", "未知的退款状态组合"),
    TRADE_REFUND_FAIL("E3007", "退款失败"),

    /**
     * 结算领域
     */
    SETTLEMENT_FILTER_SC_VALIDATE_FAIL("E4001", "结算黑名单拦截"),
    SETTLEMENT_FILTER_EMPTY_TEAM_FAIL("E4002", "非法的拼团队伍"),
    SETTLEMENT_FILTER_GROUP_TIME_EXPIRED("E4003", "拼团时间已过期"),
    SETTLEMENT_NOTIFY_FAIL("E4004", "结算通知失败"),
    ;

    private String code;
    private String info;

}
